function nameF() {
    layui.use(['layer', 'jquery'], function () {
        const $ = layui.jquery;
        const layer = layui.layer;
        const contextPath = document.location.pathname;  //获取上下文路径
        const username_input = $('#username_input');
        const password_input = $('#password_input');
        const user_login = $('#user_login');

        /*username_input.blur(() => {       //用户名输入框失去焦点时,进行判空
            let username = username_input.val();
            if (username === "1"){
            }
        })*/

        //登录验证
        user_login.click(() => {
            let username = username_input.val();
            let password = password_input.val();

            if (username === "" || $.trim(username) === "") {
                username_input.focus();  //获取输入框焦点
                layer.tips('用户名不能为空!', username_input, {
                    tips: [1, '#d80f3e'] //还可配置颜色
                });
            } else if (password === "" || $.trim(password) === "") {
                password_input.focus();  //获取输入框焦点
                layer.tips('密码不能为空!', password_input, {
                    tips: [1, '#d80f3e'] //还可配置颜色
                });
            } else {
                $.post({
                    url: `${contextPath}user/userLoginVerify`,
                    data: {username: username, password: password},
                    success: function (msg) {
                        if (msg === "1") {
                            username_input.focus()
                            layer.tips("用户名不存在!", username_input, {
                                tips: [1, '#d80f3e']
                            })
                        } else if (msg === "2") {
                            password_input.focus()
                            layer.tips("密码错误!", password_input, {
                                tips: [1, '#d80f3e']
                            })
                        } else {
                            //加载层-默认风格
                            layer.load();
                            //等待1s跳转
                            setTimeout(function () {
                                //验证成功,提交表单
                                $('#user_login_action').submit();
                                layer.closeAll('loading');
                            }, 1000);
                        }
                    },
                });
            }

        });
    });
}